import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.util.Scanner;

public class TcpPractice {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1",10086);//创建资源
//        写出数据
        OutputStream outputStream = socket.getOutputStream();
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        byte[] bytes = s.getBytes();
        outputStream.write(bytes);
        outputStream.close();
        socket.close();

    }
}
